<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-menu default-active='active' mode='horizontal' class='menu-unit'>
      <el-menu-item v-for='item in Container1' :index="'本地文件'===item.name?'active':'default'">
        <el-link @click="gotoMenu(item.url)" :type="'本地文件'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
      </el-menu-item>
    </el-menu>
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
      <tr>
        <td class="containerBack">
          <el-form ref="form" :model="s_1" :rules="rules" label-width="100px" id="mvcfm">
            <div class="form-unit">
              <span class="mvc-title-left"> 选择本地文件 </span>
            </div>
            <el-table :data="s_1">
              <el-table-column label="操作" prop="" width="60">
                <template slot-scope="scope">
                  <el-link @click="appendRow(s_1,scope)" type='success'><i class='el-icon-plus' title='增加行' /></el-link>
                  <el-link @click="delRow(s_1,scope)" type='danger'><i class='el-icon-minus' title='删除行' /></el-link>
                </template>
              </el-table-column>
              <el-table-column label="文件" prop="">
                <template slot-scope="scope">
                  <input type=file />
                </template>
              </el-table-column>
            </el-table>
            <el-button @click="('&CMODULEID=ts_account&link_item_id='+login_user_id+'&popFileAppend=filenamesize')" type='success' size="mini"><i class='fa fa-check'></i>上传</el-button>
          </el-form>
        </td>
      </tr>
    </table>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'LocalFileChoice',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_1: [],
        loading: false,
        Container1: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "862DFD0FBB2143AF8E80537D84D3B0F6",
        name: "邮箱文件",
        selected: "本地文件"
      }, 'Container1', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/oa/communication/EmailAction/localFileChoice?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
